This page last changed on Jun 23, 2008 by iank@bearcave.com.

A simple moving average model

Stocks for testing
GOOG
GS
CME
FCX
OIH
RIG
AMGN
BIIB
Window Sizes
Short Long
200 1200

For testing purposes, use

-0.4 = signal = avg[ short window ] - avg[ long window ]

Placing the stop loss limit order.

  • Place a limit order after the buy order with a sell price that is:

fill price - ((Median Absolute Deviation of 50 ticks) * 3)

Every twenty ticks recalculate the limit price and move it up if necessary. Or move the limit as the prices changes three basis points (0.0003 or 0.03%)

If the stock has not moved 20 basis points in 1000 seconds, sell it.

If the stock has moved favorably 50 basis points, sell it.